]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
fix selection of all-workspace windows
authorMaxim Ermilov <zaspire@rambler.ru>
Fri, 19 Feb 2010 16:42:36 +0000 (19:42 +0300)
committerMaxim Ermilov <zaspire@rambler.ru>
Fri, 19 Feb 2010 18:29:46 +0000 (21:29 +0300)
all-workspace windows can be active on every workspace.
https://bugzilla.gnome.org/show_bug.cgi?id=603078

js/ui/main.js
js/ui/workspace.js

index a749a0175188cfa7b1a70498bc705b88320704ba..902ee5b02897b35986c8b1f0f159f5c971bec683 100644 (file)
@@ -400,13 +400,14 @@ function getRunDialog() {
  * activateWindow:
  * @window: the Meta.Window to activate
  * @time: (optional) current event time
+ * @workspaceNum: (optional) window's workspace number
  *
  * Activates @window, switching to its workspace first if necessary,
  * and switching out of the overview if it's currently active
  */
-function activateWindow(window, time) {
+function activateWindow(window, time, workspaceNum) {
     let activeWorkspaceNum = global.screen.get_active_workspace_index();
-    let windowWorkspaceNum = window.get_workspace().index();
+    let windowWorkspaceNum = (workspaceNum !== undefined) ? workspaceNum : window.get_workspace().index();
 
     if (!time)
         time = global.get_current_time();
index 7e67043ef6a8cd2df78de0e654bf588d218ebcfb..7a5f31f7aa09556ec512c207beb34f00c7bef701 100644 (file)
@@ -1417,7 +1417,7 @@ Workspace.prototype = {
     },
 
     _onCloneSelected : function (clone, time) {
-        Main.activateWindow(clone.metaWindow, time);
+        Main.activateWindow(clone.metaWindow, time, this.workspaceNum);
     },
 
     _removeSelf : function(actor, event) {